home *** CD-ROM | disk | FTP | other *** search
- -- card: 16247 from stack: in.3r
- -- bmap block id: 0
- -- flags: 4000
- -- background id: 2202
- -- name: NumberofChars
- ----- HyperTalk script -----
- function NumberOfChars theChar, theString
- put 0 into charCount
- put first character of theChar into theChar -- strip
- repeat with i = 1 to the length of theString
- if character i of theString is theChar then add 1 to charCount
- end repeat
- return charCount
- end NumberOfChars
-
-
-
-
- -- part contents for background part 10
- ----- text -----
- 3
-
- -- part contents for background part 2
- ----- text -----
- --
- -- NumberOfChars -- utility function that tells you how many times a
- -- character turns up in a string
- --
- function NumberOfChars theChar, theString
- put 0 into charCount
- put first character of theChar into theChar -- strip
- repeat with i = 1 to the length of theString
- if character i of theString is theChar then add 1 to charCount
- end repeat
- return charCount
- end NumberOfChars
-
-
-
- -- part contents for background part 3
- ----- text -----
- NumberofChars
-
- -- part contents for background part 19
- ----- text -----
- Functions